package ooday05;

public class FinalDemo {

}

final class Hoo{}
//class Ioo extends Hoo{} //编译错误，final的类不能被继承
class Joo{}
final class Koo extends Joo{} //

//演示final修饰变量
class Eoo{
    final int num=5;
    void show(){
        //num =55;  //编译错误，final不能被修改

    }
}



class Foo{
    final void show(){}
    void test(){}
}

class Goo{
    void show(){}
    void test(){}
}



